package io;

import java.io.*;

public class practice {
    public static void main(String[] args) throws IOException, ClassNotFoundException {
        String name="王二麻子哦";
        String gender="公的";
        String [] otherInfo ={"打死一个龟孙，龟孙，小龟孙"};
        int age=48;
        Student zs=new Student(name,age,gender,otherInfo);
        System.out.println(zs);
  FileOutputStream sis=new FileOutputStream("student");
  ObjectOutputStream sos=new ObjectOutputStream(sis);
  sos.writeObject(zs);
  System.out.println("搞定");
  sos.close();
   FileInputStream si=new FileInputStream("student");
   ObjectInputStream so=new ObjectInputStream(si);
        Object obj = so.readObject();
    Student de=(Student)obj;
    System.out.println(de);
    so.close();


    }
}
